package com.hqd.test.observe;

import lombok.Data;

import java.util.Observable;
import java.util.Observer;

@Data
public class Fans1 implements Observer {
    private String name = "张三";

    @Override
    public void update(Observable o, Object obj) {
        if (o instanceof GieGie) {
            GieGie gg = (GieGie) o;
            System.out.println(String.format("粉丝'%s'知道了GieGie'%s'正在 %s,马上过去点赞", name,
                    gg.getName(), gg.getMsg()));
        }
    }
}
